windows and osx build fixes for recent ByteString conversion work
authorJoey Hess <joeyh@joeyh.name>
Fri, 24 Jan 2025 15:37:17 +0000 (11:37 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 24 Jan 2025 15:39:33 +0000 (11:39 -0400)
Utility/Daemon.hs
Utility/DirWatcher/FSEvents.hs
Utility/DirWatcher/Win32Notify.hs
Utility/Gpg.hs
Utility/StatelessOpenPGP.hs

index c2a3d1bde7da831e6f1e283aa166f3abe8f890e0..38f8d09aee5d87713cfe702b96d02594d4ebe701 100644 (file)
@@ -189,6 +189,6 @@ winLockFile pid pidfile = do
        prefix = pidfile ++ "."
        suffix = ".lck"
        cleanstale = mapM_ (void . tryIO . removeFile) =<<
-               (filter iswinlockfile <$> dirContents (fromRawFilePath (parentDir (toRawFilePath pidfile))))
+               (filter iswinlockfile . map fromRawFilePath <$> dirContents (parentDir (toRawFilePath pidfile)))
        iswinlockfile f = suffix `isSuffixOf` f && prefix `isPrefixOf` f
 #endif
index 7b6be6f13b97ffac3d6e8583d9c645994908064c..da2b3194bcc0f9471947cc788c2abdb91400b869 100644 (file)
@@ -70,7 +70,8 @@ watchDir dir ignored scanevents hooks = do
        scan d = unless (ignoredPath ignored d) $
                -- Do not follow symlinks when scanning.
                -- This mirrors the inotify startup scan behavior.
-               mapM_ go =<< emptyWhenDoesNotExist (dirContentsRecursiveSkipping (const False) False d)
+               mapM_ (go . fromRawFilePath) =<< emptyWhenDoesNotExist
+                       (dirContentsRecursiveSkipping (const False) False (toRawFilePath d))
          where         
                go f
                        | ignoredPath ignored f = noop
index e5ce316ce6bfaf07f234485dc0882eae3c834f1d..5f53c13bf5b6fbd3a7006da8906d9aa60b8694d9 100644 (file)
@@ -43,7 +43,8 @@ watchDir dir ignored scanevents hooks = do
                runhook h s = maybe noop (\a -> a (filePath evt) s) (h hooks)
 
        scan d = unless (ignoredPath ignored d) $
-               mapM_ go =<< emptyWhenDoesNotExist (dirContentsRecursiveSkipping (const False) False d)
+               mapM_ (go . fromRawFilePath) =<< emptyWhenDoesNotExist
+                       (dirContentsRecursiveSkipping (const False) False (toRawFilePath d))
          where         
                go f
                        | ignoredPath ignored f = noop
index 19dd7f5395af9f2861ca69450e929a8855ef6577..763028e7dc215932c5287f6473923e0bbec25c05 100644 (file)
@@ -179,10 +179,10 @@ feedRead cmd params passphrase feeder reader = do
                go (passphrasefd ++ params)
 #else
        -- store the passphrase in a temp file for gpg
-       withTmpFile "gpg" $ \tmpfile h -> do
+       withTmpFile (toOsPath "gpg") $ \tmpfile h -> do
                liftIO $ B.hPutStr h passphrase
                liftIO $ hClose h
-               let passphrasefile = [Param "--passphrase-file", File tmpfile]
+               let passphrasefile = [Param "--passphrase-file", File (fromosPath tmpfile)]
                go $ passphrasefile ++ params
 #endif
   where
index 6150bce63338c7a864e0c126b0f0385f26eb921f..874ed84e1988965940aa072ad1f58eca3daf9723 100644 (file)
@@ -163,7 +163,7 @@ feedRead cmd subcmd params password emptydirectory feeder reader = do
        withTmpFile (toOsPath "sop") $ \tmpfile h -> do
                liftIO $ B.hPutStr h password
                liftIO $ hClose h
-               let passwordfile = [Param $ "--with-password="++tmpfile]
+               let passwordfile = [Param $ "--with-password=" ++ fromOsPath tmpfile]
                -- Don't need to pass emptydirectory since @FD is not used,
                -- and so tmpfile also does not need to be made absolute.
                case emptydirectory of